@extends('admin.public')

@section('content')
    <div class="col-md-12">
        <form data-validate="parsley" method="post" enctype="multipart/form-data">
            {!! csrf_field() !!}
            <section class="panel panel-default">
                <header class="panel-heading">
                    {{ $frame['title'] }}
                    <a href="{{ route('admin.workorder.index') }}"
                       class="btn btn-xs btn-default pull-right">工单列表</a>
                </header>
                <div class="panel-body">
                    <p class="text-muted">遇到什么问题了吗?请告诉我们哦,我们会全力为您服务~</p>
                    <div class="form-group">
                        <label>工单简述</label>
                        <input type="text"
                               class="form-control parsley-validated"
                               placeholder="请填写工单简述"
                               name="name"
                               data-required="true">
                    </div>
                    <div class="form-group pull-in clearfix">
                        <div class="col-sm-6">
                            <label>工单类型</label>
                            <select name="type"
                                    class="form-control">
                                <option value="网站修改">网站修改</option>
                                <option value="网站优化">网站优化</option>
                            </select>
                        </div>
                        <div class="col-sm-6">
                            <label>您的联系方式</label>
                            <input type="text"
                                   class="form-control parsley-validated"
                                   placeholder="手机号码/QQ/微信号"
                                   name="connect"
                                   data-required="true">
                        </div>
                    </div>

                    <div class="form-group">
                        <label>详细信息</label>
                        <div id="describe" name="describe" type="text/plain" style="width: 100%;height: 300px;"></div>
                    </div>
                    @if(!empty($jiaji))
                        <div class="checkbox i-checks">
                            <label>
                                <input type="checkbox" name="jiaji"
                                       class="parsley-validated"><i></i> 勾选此项,此工单将会加急处理,当前剩余加急次数:{{ $jiaji }}次
                            </label>
                        </div>
                    @endif
                </div>
                <footer class="panel-footer text-right bg-light lter">
                    <button type="submit" class="btn btn-success btn-s-xs">提交工单</button>
                </footer>
            </section>
        </form>
    </div>
@endsection

@section('css')
@endsection

@section('js')
    <!-- datepicker -->
    <script src="/public/theme/js/datepicker/bootstrap-datepicker.js"></script>

    <!-- parsley -->
    <script src="/public/theme/js/parsley/parsley.min.js"></script>
    <script src="/public/theme/js/parsley/parsley.extend.js"></script>
    <script type="text/javascript" src="/public/theme/js/jPlayer/jquery.jplayer.min.js"></script>
    <script type="text/javascript" src="/public/theme/js/jPlayer/add-on/jplayer.playlist.min.js"></script>
    <script type="text/javascript" src="/public/theme/js/jPlayer/demo.js"></script>


    <!-- uediter -->
    <script src="/public/laravel-u-editor/ueditor.config.js"></script>
    <script src="/public/laravel-u-editor/ueditor.all.min.js"></script>
    <script src="/public/laravel-u-editor/lang/zh-cn/zh-cn.js"></script>

    <script>
        var uea = UE.getEditor('describe');
    </script>

@endsection
